package cn.accp.mvc.controller;


import java.util.ArrayList;
import java.util.List;

import javax.servlet.http.HttpSession;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import cn.accp.mvc.entity.District;
import cn.accp.mvc.service.DistrictService;

@Controller
@RequestMapping("/page")
public class DistrictController {
	@Autowired
	private DistrictService districtService;
	public void setDistrictService(DistrictService districtService) {
		this.districtService = districtService;
	}
	@RequestMapping("/getAllDistrict")
	public String getAllTypes(HttpSession session){
		List<District> districtList = new ArrayList<District>();
		districtList = districtService.getAllDistrict();
		session.setAttribute("districtList", districtList);
		return "/page/getAllStreet.do";
	}
	
}
